package com.illya.result;

import lombok.Data;

import java.io.Serializable;

@Data
public class Result  implements Serializable {
    private Integer code;
    private String msg;

    public static Result success(String msg) {
        Result result = new Result();
        result.code = 1;
        result.msg = msg;
        return result;
    }
    public static Result error(String msg) {
        Result result = new Result();
        result.code = 0;
        result.msg = msg;
        return result;
    }
}
